package com.nikolaj.kuzan.utils;


/**
 * Created by Николай on 13.04.14.
 */
public class Printer {

    public static void printImg(Double[] imgToPrint, int rowSize){

        try {

            for (int i = 0; i < imgToPrint.length; i++) {
                if (i % Math.round(Math.sqrt(imgToPrint.length)) == 0) {
                    System.out.println();
                }
                System.out.print(imgToPrint[i].intValue());
            }
            System.out.println();
        } catch (Exception e){
            System.out.println("Cann't print image to console. Image size is wrong");
        }
    }

}
